'use strict';
const db = uniCloud.database();
const collection = db.collection('petList');

exports.main = (event, context) => {
	console.log(event);
	switch(event.type){
		case 'get':
			return getPetList(event,context);
			break;
			
			
			
			
		default:return{}
	}
	
	
	//返回数据给客户端
	
	
};


async function getPetList(event,context){
	const getList = await collection.get();
	return getList;
}